* {
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 1005;
  font-size: 20px;
  font-family: '楷体';
}

.btn {
  position: relative;
  top: 200px;
  height: 120px;
  width: 800px;
  background: #fff;
  padding: 20px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0 auto;
  border: 1px solid #ccc;
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  display: block;
  width: 0;
  height: 1px;
  right: -2px;
  top: -2px;
  background-color: #6cf;
  z-index: -1;
  transition: width .4s linear, height .4s linear;
}

.btn:hover {
  color: orangered;
  transition: all .4s;
}

.btn:hover::before {
  content: "";
  transition: width .4s linear, height .4s linear;
  width: 800px;
  height: 120px;
}

.btn::after {
  content: "";
  position: absolute;
  display: block;
  width: 0;
  height: 1px;
  left: -2px;
  bottom: -2px;
  background-color: #6cf;
  z-index: -1;
  transition: width .4s linear, height .4s linear;
}

.btn:hover::after {
  content: "";
  transition: width .4s linear, height .4s linear;
  width: 800px;
  height: 120px;
}